<script type="text/javascript">
    $(document).ready(function() {
        $("#room-table").dataTable( {
            "sPaginationType": "full_numbers",
             "bJQueryUI": true,
            "sDom": 'T<"clear">lfrtip',
            "oTableTools": {
                "sSwfPath": "<? echo base_url() . "asset/images/swf/copy_cvs_xls_pdf.swf"; ?>"
            }                
        }
    );
    });
</script>
<!-- start content -->

<div id="content">
 <?php

			if($this->session->flashdata('sucess_notif'))
			{			
						$notif=$this->session->flashdata('sucess_notif');
						
						echo '<script>message_alert("'.$notif.'","MessageBarOk")</script>';
			}
			elseif($this->session->flashdata('fail_notif'))
			{
						$notif=$this->session->flashdata('fail_notif');
					
						echo '<script>message_alert("'.$notif.'","MessageBarWarning")</script>';
			}
?>
	<!--  start page-heading -->
	<div id="page-heading">
		<h1>Pengaturan Kamar</h1>
	</div>

<div id="topmenu" align="right">
<ul id="list">

<li><div align="center">&nbsp;<a href="<?=base_url()?>admin/staff"><img src="<?=base_url()?>asset/images/backend/user2.png" align="middle" width="40" height="40"><br/>Lihat Staff</a></div></li>&nbsp;&nbsp;&nbsp;&nbsp;
<li><div align="center"><a href="<?=base_url()?>admin/staff_add_form"><img src="<?=base_url()?>asset/images/backend/user2add.png" align="middle" width="40" height="40">&nbsp;<br/>Tambah Staff</a></div></li>
<li><div align="center"><a href="<?=base_url()?>admin/staff_access"><img src="<?=base_url()?>asset/images/backend/user2.png" align="middle" width="40" height="40">&nbsp;<br/>Lihat Akses Staff</a></div></li>

<?php
if($this->my_functions->checkAllStaffHasNoAcess()==true)
{
	?>
	<li><div align="center"><a href="<?=base_url()?>admin/staff_access_add_form"><img src="<?=base_url()?>asset/images/backend/user2add.png" align="middle" width="40" height="40">&nbsp;<br/>Tambah Akses Staff</a></div></li>
	<?php
}
else
	{
		?>
		<?php
	}
?>

</ul>
</div>
    
    
	
				<!--  start articles-table ..................................................................................... -->
				
				<form id="mainform" action="">
				<table border="0" width="100%" cellpadding="0" class="tablesorter" cellspacing="0" id="room-table">
					<thead>
					<tr>
					<!--<th class="table-header-check"><a id="toggle-all" ></a> </th>-->
					<th class="table-header-repeat line-left"><a href="">Nama</a></th>
					<th class="table-header-repeat line-left"><a href="">Tipe Kamar</a></th>
					<th class="table-header-repeat line-left"><a href="">Lantai</a></th>
					<th class="table-header-options line-left"><a href="">Pilihan</a></th>
				</tr>
					</thead>
					<tbody>
				<?php
				//$num=count($article);
                                if(isset($rooms))
                                {
				$temp=0;
                                 //to restrict any category, is here
				  $restricted=array('1');
				foreach($rooms as $row)
				{
					$temp++;
					
					if($temp%2!=0)
					{
						echo "<tr>";
					}
					else
					{
							echo "<tr class='alternate-row'>";	
					}
				?>
				
					<!--<td><input  type="checkbox"/></td>-->
					
					<td><?=$row->id_card;?></td>
					<td><?=$row->staff_name;?></td>
					<td><?=$row->gender;?></td>
					<td><?=$row->email;?></td>
					
					<td><?=$row->dep_name;?></td>
					
					<td class="options-width">
						<script>
							function confirmDelete(delUrl) {
							  if (confirm("Apakah Anda Yakin ?")) {
							   document.location = delUrl;
							  }
							}
						</script>
                                       
                                               <a href="<?=base_url()?>admin/edit_user_form/<?=$row->staff_id?>" title="Ubah" class="icon-1 info-tooltip"></a>
					<a href="javascript:confirmDelete('<?=base_url()?>admin/staff_delete/<?=$row->staff_id ?>')" title="Hapus" class="icon-2 info-tooltip"></a>
                                     
			
					</td>
				</tr>
				<?php
				}
                 
                                }
                                elseif(sizeof($rooms)<1)
                                {
                                    $this->load->view('notification/v_nodatafound');
                                }
                                else
                                {		
                                    $this->load->view('notification/v_nodatafound');
                                }
				?>
				</tbody>
				</table>
				<!--  end product-table................................... --> 
				</form>
			</div>
			<!--  end content-table  -->